<template>
<div class="margin-top-40">
    <div v-html="detailsData.content"></div>
    <comment :commentId='$route.params.newsid'></comment>

</div>  
</template>

<style>

</style>
<script>
import common from '../../static/common/common.js'
import comment from '../comment/comment.vue'
    export default{
        data(){
            return {
                detailsData:{}
            }
        },
        methods:{
            getDetailsData(){
                console.log(this.$route.params.newsid);
                const url = common.baseUrl+'api/getnew/'+this.$route.params.newsid
                this.$http.get(url).then(res=>{
                    this.detailsData = res.body.message[0]
                },err=>{
                    console.log(err);
                })
            }
        },
        created(){
            this.getDetailsData()
        },
        components:{
            comment
        }
         
    }
</script>
